// map与forEach的区别
var numbers = [65, 44, 12, 4];
var newarray = numbers.map(myFunction);

function myFunction(num) {
    return num * 10;
}

console.log(newarray);
console.log(numbers);

numbers.forEach(myFunction2);

function myFunction2(item, index, arr) {
    arr[index] = item * 10;
}

console.log(numbers);


